package com.iman.locker.model;

import android.graphics.drawable.Drawable;

/**
 * Created by esirong on 2015-12-05.
 */
public class AppInfo {
    /**
     * 应用名称
     */
    public String label;
    /**
     * 应用包名
     */
    public String packageName;
    /**
     * 应用的图标
     */
    public Drawable icon;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AppInfo appInfo = (AppInfo) o;

        if (label != null ? !label.equals(appInfo.label) : appInfo.label != null) return false;
        return packageName.equals(appInfo.packageName);

    }

    @Override
    public int hashCode() {
        int result = label != null ? label.hashCode() : 0;
        result = 31 * result + packageName.hashCode();
        return result;
    }
}
